﻿//Create By Leven
//Copyright 2008 LevenStudio
//http://leven.com.cn/
//For LevenBlog2.0
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace LevenBlog.Core.Entities
{
    /// <summary>
    ///表lb_userinfo
    /// </summary>
    [Serializable]
    [DataContract(Name = "userinfo")]
    [Table("lb_userinfo", Info = "")]
    public class lb_userinfo : BaseEntity
    {
        [DataMember]
        [Column("id", DataType.Int32, Length = 4, CanNull = false, AutoIncrement = true, PrimaryKey = true)]
        public int id { get; set; }

        [DataMember]
        [Column("userid", DataType.Int32, Length = 4, CanNull = false)]
        public int userid { get; set; }

        [DataMember]
        [Column("mail", DataType.VarChar, Length = 100)]
        public string mail { get; set; }

        [DataMember]
        [Column("question", DataType.VarChar, Length = 100)]
        public string question { get; set; }

        [DataMember]
        [Column("answer", DataType.VarChar, Length = 100)]
        public string answer { get; set; }

        [DataMember]
        [Column("nickname", DataType.VarChar, Length = 40)]
        public string nickname { get; set; }

        [DataMember]
        [Column("birthday", DataType.DateTime)]
        public DateTime birthday { get; set; }

        [DataMember]
        [Column("sex", DataType.Int16, Length = 1)]
        public Int16 sex { get; set; }

        [DataMember]
        [Column("face", DataType.VarChar, Length = 510)]
        public string face { get; set; }

        [DataMember]
        [Column("signature", DataType.VarChar, Length = 2000)]
        public string signature { get; set; }

        [DataMember]
        [Column("regtime", DataType.DateTime, CanNull = false)]
        public DateTime regtime { get; set; }

        [DataMember]
        [Column("regip", DataType.VarChar, Length = 100, CanNull = false)]
        public string regip { get; set; }

        [DataMember]
        [Column("lastlogintime", DataType.DateTime, CanNull = false)]
        public DateTime lastlogintime { get; set; }

        [DataMember]
        [Column("lastloginip", DataType.VarChar, Length = 100, CanNull = false)]
        public string lastloginip { get; set; }

        public lb_userinfo()
        {
            this.answer = string.Empty;
            this.birthday = DateTime.Now;
            this.face = string.Empty;
            this.id = -1;
            this.lastloginip = string.Empty;
            this.lastlogintime = DateTime.Now;
            this.mail = string.Empty;
            this.nickname = string.Empty;
            this.question = string.Empty;
            this.regip = string.Empty;
            this.regtime = DateTime.Now;
            this.sex = 1;
            this.signature = string.Empty;
            this.userid = -1;
        }

    }
}

